import {useDispatch, useSelector} from "react-redux";
import {CURDEVICE} from "../getters/devices.ts";
import {setCurDevice} from "../reducers/device.ts";

export const useCurDevice=()=>useSelector(CURDEVICE);
export function useDispatchCurDevice(){
    const dispatch = useDispatch();
    const setCurDeviceState = (payload:string) => dispatch(setCurDevice(payload));
    return {setCurDeviceState};
}